SimulateAxisRelative
Calculates the duration a relative move takes to complete.
Syntax
KsError SimulateAxisRelative(
int Index,
double Distance,
double Velocity,
double Acceleration,
double Deceleration,
double Jerk,
double* AccelerationTime,
double* DecelerationTime,
double* Duration
);
Parameters
Index: the index of an axis. Indexes are zero based. Aliases affect this parameter.
Distance: the relative distance for the motion. [unit]
Velocity: a value of the maximum velocity. (not necessarily reached) [unit/second]
Acceleration: a value of the acceleration. The unit is determined by the McProfileType type. (increasing power of the motor) [unit/second2] or [second]
Deceleration: a value of the deceleration. The unit is determined by the McProfileType type. (decreasing power of the motor) [unit/second2] or [second]
Jerk: a value of the jerk. The unit is determined by the McProfileType type. [unit/second3] or [second]
AccelerationTime: the duration of the move acceleration phase.
DecelerationTime: the duration of the move deceleration phase.
Duration: the duration of the move.
Return value
If the function succeeds, it returns errNoError
, otherwise an error code. For more information about the error code, see the KsError list.
Example
N/A
Requirements
RT | Win32 | |
---|---|---|
Minimum supported version | 4.0 | 4.0 |
Header | ksmotion.h | ksmotion.h |
Library | KsApi_Rtss.lib | KsApi.lib |
See also